#import "LanternPlumeController.h"
        
#import "LanternPlumeModel.h"
#import "LanternPlumeCell.h"
#import "Masonry.h"

@interface LanternPlumeController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *symphonyCollectionView;
@property (nonatomic, strong) NSMutableArray *noodleUmbraArr;

@end

@implementation LanternPlumeController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self leapfrogCourageousUnderwaterConfiglayout];
	[self wonderVelvetMellowrequestData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)noodleUmbraArr {
	if (!_noodleUmbraArr) {
		_noodleUmbraArr = [NSMutableArray array];
	}
	return _noodleUmbraArr;
}

- (void)leapfrogCourageousUnderwaterConfiglayout {
    UICollectionViewFlowLayout *joyousYard = [[UICollectionViewFlowLayout alloc] init];
    joyousYard.minimumLineSpacing = 10;
    joyousYard.minimumInteritemSpacing = 10;
    joyousYard.itemSize = CGSizeMake(100, 100);
    joyousYard.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.symphonyCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:joyousYard];
    self.symphonyCollectionView.backgroundColor = UIColor.clearColor;
    self.symphonyCollectionView.delegate = self;
    self.symphonyCollectionView.dataSource = self;
    self.symphonyCollectionView.showsHorizontalScrollIndicator = NO;
    self.symphonyCollectionView.showsVerticalScrollIndicator = NO;
    [self.symphonyCollectionView registerClass:[LanternPlumeCell class] forCellWithReuseIdentifier:NSStringFromClass([LanternPlumeCell class])];
    
    [self.view addSubview:self.symphonyCollectionView];
    [self.symphonyCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)wonderVelvetMellowrequestData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.noodleUmbraArr.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    LanternPlumeCell *laughterFeastPonder = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([LanternPlumeCell class]) forIndexPath:indexPath];
    return laughterFeastPonder;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
